package model

import (
	"database/sql"
	"time"
)

type Router struct {
	DeviceID   int    `db:"device_id,omitempty" json:"device_id,omitempty"`
	SN         string `db:"sn,omitempty" json:"sn,omitempty"`
	MAC        string `db:"mac,omitempty" json:"mac,omitempty"`
	Type       int    `db:"type,omitempty" json:"type,omitempty"`
	CreateTime string `db:"create_time,omitempty" json:"create_time,omitempty"`
	Name       string `db:"name,omitempty" json:"name,omitempty"`
}

type DeviceUserBind struct {
	BindID   	int    		 `db:"bind_id,omitempty" json:"bind_id,omitempty"`
	DeviceID   	int    		 `db:"device_id,omitempty" json:"device_id,omitempty"`
	UID   		int   	 	 `db:"uid,omitempty" json:"uid,omitempty"`
	BindTime  	time.Time    `db:"bind_time,omitempty" json:"bind_time,omitempty"`
	UnbindTime  *time.Time    `db:"unbind_time,omitempty" json:"unbind_time,omitempty"`
	Status      int	     	 `db:"status,omitempty" json:"status,omitempty"`
}

type DeviceBind struct {
	DeviceID sql.NullInt64  `db:"device_id,omitempty" json:"device_id,omitempty"`
	BindID   sql.NullInt64  `db:"bind_id,omitempty" json:"bind_id,omitempty"`
	UID      sql.NullInt64  `db:"uid,omitempty" json:"uid,omitempty"`
	SN       sql.NullString `db:"sn,omitempty" json:"sn,omitempty"`
	MAC      sql.NullString `db:"mac,omitempty" json:"mac,omitempty"`
	NAME     sql.NullString `db:"name,omitempty" json:"name,omitempty"`
	Status   sql.NullInt64  `db:"status,omitempty" json:"status,omitempty"`
}

type WifiInfo struct {
	SwitchWifi  	  	int   	 	`json:"switchWifi2_4"`
	SwitchWifi5   		int   	 	`json:"switchWifi5"`
	SSIDName   			string   	`json:"ssid_name"`
	SecurityMode   		int   		`json:"security_mode"`
	Password  		 	string   	`json:"password"`
	PrivateHideName   	int   		`json:"private_hide_name"`
}
